package com.ym.controller.medical;

import com.ym.core.annotation.Log;
import com.ym.core.domain.APIResponse;
import com.ym.core.domain.BaseController;
import com.ym.medical.service.IMindSV;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
 * 心意Controller
 * 
 * @author ym
 * @date 2020-09-02
 */
@Api(tags = "medical-心意")
@RestController("MindPcController")
@Validated
@RequestMapping("/medical/mind")
public class MindController extends BaseController {

    @Autowired
    private IMindSV mindSV;

    @ApiOperation("删除心意")
    @Log(printQuery = false)
    @PostMapping("/delete")
    public APIResponse delete(@RequestBody @Valid @NotNull Long[] ids) {
        int result = mindSV.deleteByIds(ids);
        return successData(result);
    }
}
